phase1: prevent ccache/gcc exec recursion when cc_version is unset
authorJo-Philipp Wich <[email protected]>
Mon, 1 Jul 2019 16:38:18 +0000 (18:38 +0200)
committerJo-Philipp Wich <[email protected]>
Tue, 2 Jul 2019 15:47:01 +0000 (17:47 +0200)
Signed-off-by: Jo-Philipp Wich <[email protected]>
phase1/master.cfg

index 1061eb27fa72eea36501199b66a56433c2d72721..5eb3f9ac970fc0cc1005b92758507e5bc3bd6dfe 100644 (file)
@@ -478,26 +478,33 @@ for target in targets:
                command = ["nproc"]))
 
        # find gcc and g++ compilers
-       if cc_version is not None:
-               factory.addStep(FileDownload(
-                       name = "dlfindbinpl",
-                       mastersrc = scripts_dir + '/findbin.pl',
-                       slavedest = "../findbin.pl",
-                       mode = 0755))
+       factory.addStep(FileDownload(
+               name = "dlfindbinpl",
+               mastersrc = scripts_dir + '/findbin.pl',
+               slavedest = "../findbin.pl",
+               mode = 0755))
 
-               factory.addStep(SetPropertyFromCommand(
-                       name = "gcc",
-                       property = "cc_command",
-                       description = "Finding gcc command",
-                       command = ["../findbin.pl", "gcc", cc_version[0], cc_version[1]],
-                       haltOnFailure = True))
+       factory.addStep(SetPropertyFromCommand(
+               name = "gcc",
+               property = "cc_command",
+               description = "Finding gcc command",
+               command = [
+                       "../findbin.pl", "gcc",
+                       cc_version[0] if cc_version is not None else '',
+                       cc_version[1] if cc_version is not None else ''
+               ],
+               haltOnFailure = True))
 
-               factory.addStep(SetPropertyFromCommand(
-                       name = "g++",
-                       property = "cxx_command",
-                       description = "Finding g++ command",
-                       command = ["../findbin.pl", "g++", cc_version[0], cc_version[1]],
-                       haltOnFailure = True))
+       factory.addStep(SetPropertyFromCommand(
+               name = "g++",
+               property = "cxx_command",
+               description = "Finding g++ command",
+               command = [
+                       "../findbin.pl", "g++",
+                       cc_version[0] if cc_version is not None else '',
+                       cc_version[1] if cc_version is not None else ''
+               ],
+               haltOnFailure = True))
 
        # see if ccache is available
        factory.addStep(SetPropertyFromCommand(